export class Singleton<T>{
    private static instance: any = null;
    public static Instance<T>(c: { new(): T }): T {
        if (this.instance == null) {
            this.instance = new c();
        }
        return this.instance;
    }

    public init() {
       
    }

//     showTip(msg = '') {
//         this.getAlert()
//         this.tipLabel.string = msg;
//         if (this.alert.active == true) {
//                 return;
//         }
//         this.alert.active = true;
//         cc.director.getScheduler().schedule(function () {
//                 this.alert.active = false;
//         }, this, 1.5);

// }
// getAlert() {
//         this.alert = cc.find("Hook/Alert");
//         this.tipLabel = cc.find("Hook/Alert/tipLabel").getComponent(cc.Label);
// }
}